package com.ctshk.rpc.user.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * <p>
 *  修改手机号req
 * </p>
 *
 * @author 李新科
 * @date 2021/4/22 9:10
 */
@Data
@ApiModel
public class UpdatePhoneReq implements Serializable {

    @NotBlank(message = "請选择區號")
    @ApiModelProperty(name="contactMobileAreaCode", value = "新聯繫人手機區號", required = true)
    private String contactMobileAreaCode;

    @NotBlank(message = "請輸入新號碼")
    @ApiModelProperty(name = "contactNumber", value = "新聯絡電話", required = true)
    @Pattern(regexp = "^[0-9]{8,11}$", message = "手机号必须是纯数字,并且是8到11位")
    private String contactNumber;

    @NotBlank(message = "請輸入原號碼驗證碼")
    @ApiModelProperty(name = "oldCode", value = "原號碼驗證碼", required = true)
    private String oldCode;

    @NotBlank(message = "請輸入新號碼驗證碼")
    @ApiModelProperty(name = "newCode", value = "新號碼驗證碼", required = true)
    private String newCode;

    @ApiModelProperty(value="用戶Id")
    private Long userId;
}
